package o;

import android.os.Bundle;
import com.huawei.cloudservice.CloudRequestHandler;
import com.huawei.hwid.core.helper.handler.ErrorStatus;

public class cch implements CloudRequestHandler {
    private d ॱ;

    public interface d {
        void ˎ();

        void ˎ(int i);
    }

    public void onFinish(Bundle bundle) {
        if (bundle == null) {
            ˏ(0);
        } else if (bundle.getInt("resultCode") == 0 && bundle.getInt("responseCode") == 200) {
            eox.ˎ(bqy.ˋ().ˏ(), false);
            ˊ();
        } else {
            ˏ(0);
        }
    }

    public void onError(ErrorStatus errorStatus) {
        if (errorStatus != null) {
            ˏ(errorStatus.getErrorCode());
            bqx.ॱ("UpdateUserInfoRequestHandler", errorStatus.getErrorCode() + "--" + errorStatus.getErrorReason());
            return;
        }
        ˏ(0);
    }

    private void ˊ() {
        if (this.ॱ != null) {
            this.ॱ.ˎ();
        }
    }

    private void ˏ(int i) {
        if (this.ॱ != null) {
            this.ॱ.ˎ(i);
        }
    }

    public void ˏ(d dVar) {
        this.ॱ = dVar;
    }
}
